import 'package:flutter/material.dart';
import 'package:online_study/course/course_details_item.dart';
import 'package:online_study/theme/colors.dart';
import 'package:online_study/theme/size.dart';


//课程目录
class CourseCataloguePage extends StatefulWidget {
  @override
  _CourseCatalogueState createState() => _CourseCatalogueState();
}

class _CourseCatalogueState extends State<CourseCataloguePage>
    with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Container(
          alignment: Alignment.centerLeft,
          padding: EdgeInsets.symmetric(horizontal: ThemeSize.width19),
          width: double.infinity,
          height: ThemeSize.height42,
          color: ThemeColor.colorWhite,
          child: Text("课程(已更新4/5)",
              style: TextStyle(
                  color: ThemeColor.color333333,
                  fontSize: ThemeSize.sp13,
                  fontWeight: FontWeight.bold)),
        ),
        Divider(height: ThemeSize.width1),
        Expanded(
            child: ListView.separated(
                itemBuilder: (BuildContext context, int index) {
                  return CourseDetailsItemPage();
                },
                separatorBuilder: (BuildContext context, int index) {
                  return Divider(height: ThemeSize.width1);
                },
                itemCount: 8)),
      ],
    );
  }

  @override
  bool get wantKeepAlive => true;
}
